from iform_util import *
from upload import *
import dlz_config as dc
def test_compaction_form():
    ts = dc.get('DLZ_COMPACTION_FORM')
    compaction_form = IformTable(None, None, ts['iform_page_id'], ts['iform_table_name'])
    data = compaction_form.all()
    data = process_iform_json(data)
    data = process_compaction_form(data)
    for r in data:
        print r['project_name'],r['project_number'],r['client_name'],r.get('lat')
    insert_compaction_form(data)
    
def test_compaction_test():
    ts = dc.get('DLZ_COMPACTION_TEST')
    compaction_test = IformTable(None, None, ts['iform_page_id'], ts['iform_table_name'])
    
    data = compaction_test.all()
    data = process_iform_json(data)
    for r in data:
        print r['ID'],r['test_location'],r['test_interval'],r.get('lat')
    insert_compaction_test(data)